// Script assets have changed for v2.3.0 see
// https://help.yoyogames.com/hc/en-us/articles/360005277377 for more information
function scr_fill_dead_way(i,j){
	var _pos;
	_pos[0]=map_show_grid_[# i+1,j];	
	_pos[1]=map_show_grid_[# i-1,j];	
	_pos[2]=map_show_grid_[# i,j+1];	
	_pos[3]=map_show_grid_[# i,j-1];
	//如果一块地板周围有三块墙
	if(((_pos[0]+_pos[1]+_pos[2]+_pos[3])==-23)&&map_show_grid_[# i,j]==-5)
	{
		map_show_grid_[# i,j]=WALL;	
		for(var k=0;k<4;k++)
		{
			var _dir=k*90;
			var iout=i+lengthdir_x(1,_dir);
			var jout=j+lengthdir_y(1,_dir);
			if(iout>0&&iout<MAP_SHOW_WIDTH-1&&jout>0&&jout<MAP_SHOW_HEIGHT-1)
			scr_fill_dead_way(iout,jout);
		}
	}
	
	

}